import request from "@/plugins/request";

// 最左侧数据
export function getLeftList() {
  return request({
    url: "/api/a/labInspectionProject/getList",
    method: "get",
  });
}

// 分页数据
export function getPage(data: Record<string, any>) {
  return request({
    url: "/api/a/labInspectionProject/page",
    method: "get",
    params: data,
  });
}

// 列表数据
export function getList() {
  return request({
    url: "/api/a/labInspectionProject/listData",
    method: "get",
  });
}

// 保存数据 添加(关联检测标准列表)
export function onSave(data: Record<string, any>) {
  return request({
    url: "/api/a/labInspectionProject/save",
    method: "post",
    data,
  });
}

// 修改
export function onEdit(data: Record<string, any>) {
  return request({
    url: "/api/a/labInspectionProject/update",
    method: "post",
    data,
  });
}

// 删除
export function onDelete(ids: string) {
  return request({
    url: `/api/a/labInspectionProject/delete/${ids}`,
    method: "delete",
  });
}

// 等级划分

// 分页数据
export function getLevelPage(data: Record<string, any>) {
  return request({
    url: "/api/a/labInspectionProjectGrading/page",
    method: "get",
    params: data,
  });
}

// 列表数据
export function getLevelList() {
  return request({
    url: "/api/a/labInspectionProjectGrading/listData",
    method: "get",
  });
}

// 删除
export function onLevelDelete(ids: string) {
  return request({
    url: `/api/a/labInspectionProjectGrading/delete/${ids}`,
    method: "delete",
  });
}

// 保存数据
export function onLevelSave(data: Record<string, any>) {
  return request({
    url: "/api/a/labInspectionProjectGrading/save",
    method: "post",
    data,
  });
}
